set(COMMITSTRINGDBUS_SOURCE commitstringdbus.cpp)
set(LIBRARY_NAME "commitstringdbus")

add_library(${LIBRARY_NAME} SHARED ${COMMITSTRINGDBUS_SOURCE})

target_link_libraries(${LIBRARY_NAME} 
                        Fcitx5::Core
                        Fcitx5::Module::DBus
                        )

install(TARGETS "${LIBRARY_NAME}" DESTINATION "${FCITX_INSTALL_LIBDIR}/fcitx5")

configure_file(${LIBRARY_NAME}-addon.conf.in ${LIBRARY_NAME}-addon.conf)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}-addon.conf" RENAME ${LIBRARY_NAME}.conf DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon")